/*
 * KeyListener.hpp
 *
 *  Created on: 12-12-2010
 *      Author: Przemek
 */

#pragma once

#include "Event.hpp"
#include "pch.hpp"

/*
 * Listener for sdl key events.
 */
class KeyListener
{
	public:
		class EventArguments: public Event
		{
			private:
				SDLKey key;
				char character;

			public:
				explicit EventArguments(SDLKey key = SDLK_UNKNOWN, char character = '\0',
						const Control* source = 0);
				EventArguments(const EventArguments& other);
				EventArguments& operator=(const EventArguments& other);

				SDLKey getKey() const;
				void setKey(SDLKey key);
				char getCharacter() const;
				void setCharacter(char character);

		};

		virtual void keyPressed(const EventArguments& arguments);
};
